package com.tong.springcloud.controller;

import com.tong.springcloud.pojo.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author Xiong Qian
 * @version 1.0
 * @date 2021/7/3 13:09
 */

@RestController
public class DeptConsumerController {

    @Autowired
    private RestTemplate restTemplate;

    //理解：消费者，不应该有service层~
    // RestTemplate....供我们直接调用就可以了！注册到spring中
    @GetMapping("/")
    public Dept getDeptById(){
        //restTemplate.getForEntity();
        return null;
    }



}

